/**
 * Defines the main routes in the application.
 * The routes you see here will be anchors '#/' unless specifically configured otherwise.
 */

define(['./app'], function (app) {
    'use strict';
    return app.config(function ($stateProvider,$urlRouterProvider) {

        $urlRouterProvider.otherwise('/error');

        $stateProvider
        //查询会员等级
        .state("membergradement",{
            url:"/membergradement",
            templateUrl:"app/membergrade/membergradement.html",
            params:{
                'operate':'find'
            }
        })
        //添加会员等级
        .state("membergrade",{
            url:"/membergrade",
            templateUrl:"app/membergrade/membergrade.html",
            params:{
                'operate':'save'
            }
        })
        //会员添加
        .state("member",{
            url:"/member",
            templateUrl:"app/member/member.html",
            params:{
                'operate':'save'
            }
        })
        //会员查询
        .state("memberment",{
            url:"/memberment",
            templateUrl:"app/member/memberment.html",
            params:{
                'operate':'find'
            }
        })
        //会员分组查询
        .state("membergroupment",{
            url:"/membergroupment",
            templateUrl:"app/membergroup/membergroupment.html",
            params:{
                'operate':'find'
            }
        })
        //会员分组添加
        .state("membergroup",{
            url:"/membergroup",
            templateUrl:"app/membergroup/membergroup.html",
            params:{
                'operate':'save'
            }
        })
        //会员充值查询
        .state("memberrechargement",{
            url:"/memberrechargement",
            templateUrl:"app/memberrecharge/memberrechargement.html",
            params:{
                'operate':'find'
            }
        })
        //会员充值
        .state("memberrecharge",{
            url:"/memberrecharge",
            templateUrl:"app/memberrecharge/memberrecharge.html",
            params:{
                'operate':'save'
            }
        })
        //会员提现列表
        .state("memberwithdrawalsment",{
            url:'/memberwithdrawalsment',
            templateUrl:"app/memberwithdrawals/memberwithdrawalsment.html",
            params:{
                'operate':'find'
            }
        })
        //会员提现申请
        .state("memberwithdrawals",{
            url:'/memberwithdrawals',
            templateUrl:"app/memberwithdrawals/memberwithdrawals.html",
            params:{
                'operate':'save'
            }
        })
        //审核会员提现申请
        .state("reviewedmemberwithdrawals",{
            url:'/reviewedmemberwithdrawals',
            templateUrl:"app/memberwithdrawals/reviewedmemberwithdrawals.html",
            params:{
                'operate':'edit'
            }
        })
        //系统操作转账列表
        .state("sysmemberwithdrawalstransferment",{
            url:'/sysmemberwithdrawalstransferment',
            templateUrl:"app/memberwithdrawals/sysmemberwithdrawalstransferment.html",
            params:{
                'operate':'find'
            }
        })
        //会员购物车列表
        .state("membercartment",{
            url:"/membercartment",
            templateUrl:"app/membercart/membercartment.html",
            params:{
                operate:'find'
            }
        })
        //添加会员购物车
        .state("membercart",{
            url:"/membercart",
            templateUrl:"app/membercart/membercart.html",
            params:{
                operate:'save'
            }
        })
        //会员收货地址列表
        .state("memberdeliveraddressment",{
            url:"/memberdeliveraddressment",
            templateUrl:"app/member/memberdeliveraddressment.html",
            params:{
                operate:'find'
            }
        })
        //添加会员收货地址
        .state("memberdeliveraddress",{
            url:"/memberdeliveraddress",
            templateUrl:"app/member/memberdeliveraddress.html",
            params:{
                operate:'save'
            }
        })
        //会员发票信息列表
        .state("memberinvoicement",{
            url:"/memberinvoicement",
            templateUrl:"app/member/memberinvoicement.html",
            params:{
                operate:'find'
            }
        })
        //添加会员发票地址
        .state("memberinvoice",{
            url:"/memberinvoice",
            templateUrl:"app/member/memberinvoice.html",
            params:{
                operate:'save'
            }
        })

        //会员IM
        .state("memberim",{
            url:"/memberim",
            templateUrl:"app/memberim/memberim.html",
            params:{
                operate:'save'
            }
        });

    });
});
